<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/8/30
 * Time: 10:24
 */
namespace app\api\model;

class Order extends BaseModel {

    protected $autoWriteTimestamp = true;

    public static function getSummaryByUser($uid,$page=1,$limit=5){
        $pagingData = self::where('user_id','=',$uid)
            ->order('create_time desc')
            ->paginate($limit,true,['page'=>$page]);
        return $pagingData;
    }
}